package com.yifan.Thread;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author YIFan
 * @Date 2023-3-2 17:46
 * @Version 1.0
 */
public class MyThread {
    private static AtomicInteger a = new AtomicInteger(0);

    public static void main(String[] args) {
        for (int i = 0; i < 100; i++) {
            new Thread(() -> {
                for(int x = 0 ; x < 100 ; x++) {
                    a.addAndGet(1) ;
                    System.out.println("count =========>>>> " + a);

                }
            }).start();
        }
    }

}
